<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script>
if('${requestScope.matchedVO}'!=""){
	var writer = '${requestScope.matchedVO.id}';
	flag=confirm("오늘의 매칭상대는 ${requestScope.matchedVO.id} 입니다. 게시글 보실려면 확인!!");
	if(flag){
		location.href="board.do?command=boardGetListById&writer="+writer;
	}
}
</script>
<script src="/funfun/js/member/login.js" charset="UTF-8"></script>
<c:choose>
	<c:when test="${sessionScope.memberVO==null}">
		<table width="100%">
			<tr valign="middle">
				<form name="loginForm" id="loginForm" method="post" action="member.do">
					<input type="hidden" name="command" value="memberLogin">
					<td valign="middle" colspan="2">
						<input type="text" name="id" id="id" maxlength="25" placeholder="아이디를 입력하세요">
						&nbsp;
					</td>
					</tr>
					<tr>
					<td valign="middle" colspan="2">
						<input type="password" name="password" id="password" maxlength="25" placeholder="패스워드를 입력하세요">
						&nbsp;
					</td>
					</tr>
					<tr><tr>
					<tr>
					<td valign="middle" align="center">
						<input type="image" name="login" id="login" src="/funfun/image/member/button/btn_login.gif" alt="로그인">
						&nbsp;
					</td>
				</form>
				<td valign="middle">
					<form name="RegistForm" id="RegistForm" method="post" action="member.do">
						<input type="hidden" name="command" value="registForm">
						<input type="image" name="regist" id="regist" src="/funfun/image/member/button/btn_join.gif" alt="회원가입">
					</form>
				</td>
			</tr>
		</table>
	</c:when>
	<c:otherwise>
		<table>
			<tr valign="middle">
				<td valign="middle" align="center" colspan="2">
					<center><font color="white"><b>${sessionScope.memberVO.name}님 로그인</b></font></center>
				</td>
			</tr>
			<tr valign="middle">
				<td valign="middle" align="center">
					<form name="updateForm" id="updateForm" method="post" action="member.do">
						<input type="hidden" name="command" value="updateForm">				
						<input type="image" name="updateForm" id="updateForm" src="/funfun/image/member/button/btn_member.gif" alt="정보수정">
						&nbsp;
					</form>
				</td>
				<td valign="middle" align="center">
					<form name="logoutForm" id="logoutForm" method="post" action="member.do">
						<input type="hidden" name="command" value="memberLogout">
						<input type="image" name="logout" id="logout" src="/funfun/image/member/button/btn_logout.gif" alt="로그아웃">
						&nbsp;
					</form>
				</td>
			</tr>
		</table>
	</c:otherwise>
</c:choose>